package com.szzg10.pattern.factory;

public class FactoryImpl implements Factory {

	@Override
	public Pizza newInstance(String name) {
		if(name.equals("sz")) {
			return new ShenZhenPizza();
		}
		else {
			return new NewYorkPizza();
		}
	}

}
